package com.lovejes.jesacl.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the ACLROLEUSER table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="ACLROLEUSER"
   @preserve all
 */

public abstract class BaseAclroleuser  implements Serializable {

	public static String REF = "Aclroleuser";
	public static String PROP_USID = "Usid";
	public static String PROP_ID = "Id";
	public static String PROP_RID = "Rid";


	// constructors
	public BaseAclroleuser () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAclroleuser (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String rid;
	private java.lang.String usid;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: RID
	 */
	public java.lang.String getRid () {
		return rid;
	}

	/**
	 * Set the value related to the column: RID
	 * @param rid the RID value
	 */
	public void setRid (java.lang.String rid) {
		this.rid = rid;
	}



	/**
	 * Return the value associated with the column: USID
	 */
	public java.lang.String getUsid () {
		return usid;
	}

	/**
	 * Set the value related to the column: USID
	 * @param usid the USID value
	 */
	public void setUsid (java.lang.String usid) {
		this.usid = usid;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.jesacl.domain.Aclroleuser)) return false;
		else {
			com.lovejes.jesacl.domain.Aclroleuser aclroleuser = (com.lovejes.jesacl.domain.Aclroleuser) obj;
			if (null == this.getId() || null == aclroleuser.getId()) return false;
			else return (this.getId().equals(aclroleuser.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}